﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.plaf {
    import flash.display.*;
    import org.aswing.*;
    import org.aswing.geom.*;
    import org.aswing.graphics.*;
    import org.aswing.error.*;

    public class BaseComponentUI implements ComponentUI {

        private var defaults:UIDefaults;

        public function installUI(_arg1:Component):void{
            throw (new ImpMissError());
        }
        public function uninstallUI(_arg1:Component):void{
            throw (new ImpMissError());
        }
        public function refreshStyleProperties():void{
            throw (new ImpMissError());
        }
        public function putDefault(_arg1:String, _arg2):void{
            if (this.defaults == null){
                this.defaults = new UIDefaults();
            };
            this.defaults.put(_arg1, _arg2);
        }
        public function getDefault(_arg1:String){
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.get(_arg1));
            };
            return (UIManager.get(_arg1));
        }
        public function paint(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            this.paintBackGround(_arg1, _arg2, _arg3);
        }
        public function paintFocus(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            if (_arg2 != null){
                _arg2.drawRectangle(new Pen(this.getDefaultFocusColorInner(), 1), (_arg3.x + 0.5), (_arg3.y + 0.5), (_arg3.width - 1), (_arg3.height - 1));
                _arg2.drawRectangle(new Pen(this.getDefaultFocusColorOutter(), 1), (_arg3.x + 1.5), (_arg3.y + 1.5), (_arg3.width - 3), (_arg3.height - 3));
            };
        }
        protected function getDefaultFocusColorInner():ASColor{
            return (this.getColor("focusInner"));
        }
        protected function getDefaultFocusColorOutter():ASColor{
            return (this.getColor("focusOutter"));
        }
        protected function paintBackGround(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            if (_arg1.isOpaque()){
                _arg2.fillRectangle(new SolidBrush(_arg1.getBackground()), _arg3.x, _arg3.y, _arg3.width, _arg3.height);
            };
        }
        public function getInternalFocusObject(_arg1:Component):InteractiveObject{
            return (_arg1);
        }
        public function getMaximumSize(_arg1:Component):IntDimension{
            return (null);
        }
        public function getMinimumSize(_arg1:Component):IntDimension{
            return (null);
        }
        public function getPreferredSize(_arg1:Component):IntDimension{
            return (null);
        }
        public function containsDefaultsKey(_arg1:String):Boolean{
            return (((!((this.defaults == null))) && (this.defaults.containsKey(_arg1))));
        }
        public function containsKey(_arg1:String):Boolean{
            return (((this.containsDefaultsKey(_arg1)) || (UIManager.containsKey(_arg1))));
        }
        public function getBoolean(_arg1:String):Boolean{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getBoolean(_arg1));
            };
            return (UIManager.getBoolean(_arg1));
        }
        public function getNumber(_arg1:String):Number{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getNumber(_arg1));
            };
            return (UIManager.getNumber(_arg1));
        }
        public function getInt(_arg1:String):int{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getInt(_arg1));
            };
            return (UIManager.getInt(_arg1));
        }
        public function getUint(_arg1:String):uint{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getUint(_arg1));
            };
            return (UIManager.getUint(_arg1));
        }
        public function getString(_arg1:String):String{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getString(_arg1));
            };
            return (UIManager.getString(_arg1));
        }
        public function getBorder(_arg1:String):Border{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getBorder(_arg1));
            };
            return (UIManager.getBorder(_arg1));
        }
        public function getIcon(_arg1:String):Icon{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getIcon(_arg1));
            };
            return (UIManager.getIcon(_arg1));
        }
        public function getGroundDecorator(_arg1:String):GroundDecorator{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getGroundDecorator(_arg1));
            };
            return (UIManager.getGroundDecorator(_arg1));
        }
        public function getColor(_arg1:String):ASColor{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getColor(_arg1));
            };
            return (UIManager.getColor(_arg1));
        }
        public function getFont(_arg1:String):ASFont{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getFont(_arg1));
            };
            return (UIManager.getFont(_arg1));
        }
        public function getInsets(_arg1:String):Insets{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getInsets(_arg1));
            };
            return (UIManager.getInsets(_arg1));
        }
        public function getStyleTune(_arg1:String):StyleTune{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getStyleTune(_arg1));
            };
            return (UIManager.getStyleTune(_arg1));
        }
        public function getInstance(_arg1:String){
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getInstance(_arg1));
            };
            return (UIManager.getInstance(_arg1));
        }
        public function getClass(_arg1:String):Class{
            if (this.containsDefaultsKey(_arg1)){
                return (this.defaults.getConstructor(_arg1));
            };
            return (UIManager.getClass(_arg1));
        }

    }
}//package org.aswing.plaf 
